<template>
  <view>
    <web-view :src="url"></web-view>
  </view>
</template>

<script>
import UdeskSdk from '../utils/ud-sdk';

export default {
  data() {
    return {
      product: {
        name: '',
        url: '',
        imgUrl: ''
      },
      url: ''
    }
  },
  methods: {
  },
  onLoad(option) {
    const { name = '', url = '', imgUrl = '' } = option
    this.product.name = name
    this.product.url = url
    this.product.imgUrl = imgUrl
    const { accountType } = this.vuex_memberInfo || {}
    const c_tags = accountType === 30?'认证客户':'普通客户'
    this.url = `https://xinfangsheng.s4.udesk.cn/im_client/?web_plugin_id=22779&product=${this.product}&c_tags=${c_tags}`
    // if (!!name) {
    //   UdeskSdk.trace('product', this.product);
    //   this.url = `https://xinfangsheng.s4.udesk.cn/im_client/?web_plugin_id=22779&group_id=19318&product=${this.product}`
    // }
  }
}
</script>

<style scoped>

</style>